package com.fortune.util;

import java.util.Random;

/**
 * 
 * @author ran
 *
 */
public class RandomCodeUtil {
	private static final String sources = "23456789";

	/**
	 * 获取6位随机数
	 * @return
	 */
	public static int get6RandomCode() {
		StringBuffer flag = new StringBuffer();
		Random rand = new Random();
		for (int j = 0; j < 6; j++) {
			flag.append(sources.charAt(rand.nextInt(7)));
		}
		return Integer.parseInt(flag.toString());
	}
}
